Skip to content

feat(tracing): add Pages execution spans - #3272

Draft
james-elicx wants to merge 1 commit into
codex/otel-05e-app-start-responsefrom
codex/otel-06a-pages-execution-spans
Draft

james-elicx wants to merge 1 commit into
codex/otel-05e-app-start-responsefrom
codex/otel-06a-pages-execution-spans

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • add Next.js-compatible Render.getServerSideProps, Render.getStaticProps, and Node.runHandler spans through the shared framework tracer
  • cover Pages dev, Node production, Workers, edge APIs, blocking fallback, stale ISR, and custom error-page data execution
  • prove real @sentry/nextjs application spans nest beneath the framework spans on Cloudflare Workers

Scope

This is OTEL-06a. Render.renderDocument, NextNodeServer.findPageComponents, and Pages NextNodeServer.startResponse remain in later focused PRs.

Validation

  • vp check
  • focused Pages tracing/data/API suites: 198 passing
  • custom 404 development regression
  • PLAYWRIGHT_PROJECT=cloudflare-sentry-pages pnpm run test:e2e: 9 passing
  • vp run vinext#build
  • two independent review agents: clean after one custom-error-page GSP omission was found and fixed

Stacked on #3271.

@pkg-pr-new

pkg-pr-new Bot commented Sep 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vinext/cloudflare

npm i https://pkg.pr.new/cloudflare/vinext/@vinext/cloudflare@3272

create-vinext-app

npm i https://pkg.pr.new/cloudflare/vinext/create-vinext-app@3272

@vinext/types

npm i https://pkg.pr.new/cloudflare/vinext/@vinext/types@3272

vinext

npm i https://pkg.pr.new/cloudflare/vinext@3272

@cloudflare/workers-response-store

npm i https://pkg.pr.new/cloudflare/vinext/@cloudflare/workers-response-store@3272

commit: c2f4edc

@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
response-store-demo preview production
static-export preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared c2f4edc against base 447a9ed using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.3 KB ⚫ 0.0%
Client entry size (gzip) vinext 129.7 KB 129.7 KB ⚫ -0.0%
Dev server cold start vinext 3.30 s 3.30 s ⚫ -0.2%
Production build time vinext 3.88 s 3.85 s ⚫ -0.8%
RSC entry closure size (gzip) vinext 125.7 KB 125.7 KB ⚫ -0.0%
Server bundle size (gzip) vinext 216.3 KB 216.3 KB ⚫ -0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx
james-elicx added this pull request to stack #3298 September 15, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant